package task3.sink;

import java.beans.MethodDescriptor;
import java.beans.ParameterDescriptor;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;
import java.lang.reflect.Method;
import task3.util.InputEvent;

public class BSinkBeanInfo
  extends SimpleBeanInfo
{
  public PropertyDescriptor[] getPropertyDescriptors()
  {
    PropertyDescriptor[] pd = new PropertyDescriptor[0];
    return pd;
  }
  
  public MethodDescriptor[] getMethodDescriptors()
  {
    try
    {
      Class<BSink> c = BSink.class;
      Class[] parameterTypes = new Class[1];
      parameterTypes[0] = InputEvent.class;
      String name = "inputChanged";
      Method method1 = c.getMethod(name, parameterTypes);
      ParameterDescriptor[] pds = new ParameterDescriptor[1];
      pds[0] = new ParameterDescriptor();
      MethodDescriptor md1 = new MethodDescriptor(method1, pds);
      return new MethodDescriptor[] { md1 };
    }
    catch (Exception ex)
    {
      ex.printStackTrace();
    }
    return null;
  }
}
